package com.xxx.nio.side;


import lombok.extern.slf4j.Slf4j;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * 消息边界问题 Client端
 */
@Slf4j
public class Client {

    public static void main(String[] args) throws IOException {
        Socket max = new Socket("localhost", 8080);
        OutputStream out = max.getOutputStream();
        out.write("hello".getBytes());
        out.write("world".getBytes());
        out.write("你好".getBytes());
        max.close();
    }
}
